Discover gists
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Player { | |
constructor(level = 1, currentXP = 0, totalXP = 0, xpForNextLevel = 100, xpGrowthRate = 1.5) { | |
this.level = level; | |
this.currentXP = currentXP; | |
this.totalXP = totalXP; | |
this.xpForNextLevel = xpForNextLevel; | |
this.xpGrowthRate = xpGrowthRate; | |
} | |
addXP(amount) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Define the Player class | |
Player = {} | |
Player.__index = Player | |
-- Constructor | |
function Player:new(level, currentXP, totalXP, xpForNextLevel, xpGrowthRate) | |
local obj = { | |
level = level or 1, | |
currentXP = currentXP or 0, | |
totalXP = totalXP or 0, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Define the Player table | |
P = { | |
l = 1, -- level | |
c = 0, -- currentXP | |
t = 0, -- totalXP | |
n = 100, -- XP for next level | |
g = 1.5 -- XP growth rate | |
} | |
-- Function to add XP to the player |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Define the Player table | |
Player = { | |
level = 1, | |
currentXP = 0, | |
totalXP = 0, | |
xpForNextLevel = 100, -- Initial XP required for level 2 | |
xpGrowthRate = 1.5 -- How much more XP is needed for each subsequent level | |
} | |
-- Function to add XP to the player |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Define the Player table | |
Player = { | |
level = 1, | |
currentXP = 0, | |
totalXP = 0, | |
xpForNextLevel = 100, -- Initial XP required for level 2 | |
xpGrowthRate = 1.5 -- How much more XP is needed for each subsequent level | |
} | |
-- Function to add XP to the player |
-
First go to https://appcenter.ms/ and create an account
-
Follow sdk setup steps and implement app center to android project
(https://docs.microsoft.com/en-us/appcenter/sdk/getting-started/android)
dependencies {
def appCenterSdkVersion = '3.2.1'
implementation "com.microsoft.appcenter:appcenter-analytics:${appCenterSdkVersion}"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Simple script to plot your Discord machine-learning predicted age and gender from the data dump. | |
To use, simply put this script in your activity/analytics/ folder of your Discord data dump and run it. | |
You may need to install matplotlib first: | |
pip install -U matplotlib | |
thrown together by rebane2001 | |
""" |
The WSL 2 docker-desktop-data vm disk image would normally reside in: %USERPROFILE%\AppData\Local\Docker\wsl\data\ext4.vhdx
Follow the following to relocate it to other drive/directory, with all existing docker data preserved (tested against Docker Desktop 4.21.1)
First, shut down your docker desktop by right click on the Docker Desktop icon and select Quit Docker Desktop
Then, open your command prompt:
wsl --list -v
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
### steps #### | |
# Verify the system has a cuda-capable gpu | |
# Download and install the nvidia cuda toolkit and cudnn | |
# Setup environmental variables | |
# Verify the installation | |
### | |
### to verify your gpu is cuda enable check |
NewerOlder